# 需要一个web框架
# D:/Python/Python311/python.exe -m pip install Flask
# D:/Python/Python311/python.exe -m pip install flask-sqlalchemy

from flask import Flask, render_template
from random import randint

app = Flask(__name__)

hero = [
    "黑暗之女 安妮",
    "狂战士 奥拉夫",
    "痛苦之拥 伊芙琳",
    "狂暴之心 凯南",
    "英勇投弹手 库奇",
    "瓦洛兰之盾 塔里克",
    "疾风剑豪 亚索",
    "暴走萝莉 金克丝",
    "河流之王 塔姆",
    "皮城执法官 蔚",
    "唤潮鲛姬 娜美",
]


@app.route("/index")
def index():
    return render_template("index.html", hero=hero)

@app.route("/choujiang")
def choujiang():
    num = randint(0, len(hero)-1)
    hero_name = hero[num]
    return render_template("index.html", hero=hero, hero_name=hero_name)

app.run(debug=True)
